package main

import (
	"fmt"
)

var num int = 1

func main() {
	for i := 1; i < 1000; i++ {
		go ronTimes(i)
	}

	//runtime.GOMAXPROCS(16) // 设置最大核心数
	//fmt.Println(runtime.NumCPU())
	fmt.Println("end main")
}

func ronTimes(times int) int {
	for i := 1; i < times; i++ {
		fmt.Println("ronTimes", i, "Hello Benjamin!", times-i)
		fmt.Println("num", num)
	}
	num++
	return times
}
